#!/usr/bin/env ruby
# encoding: UTF-8

class RequestController
  def call(env)
    route = BrainRackApplication.router.route_for(env)

    if route
      response = route.execute(env)
      return response.rack_response
    else
      [404, {}, []]
    end
  end
end
